﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers {
    import net.wooga.pets.models.world.vos.*;
    import net.wooga.pets.interfaces.*;
    import net.wooga.pets.constants.*;

    public class InitPatientCommand extends InitActorCommand {

        override public function execute():void{
            var _local1:ITreatable = (event.info.actor as ITreatable);
            _local1.speed = ((int(getData("patient/speed"))) || (16));
            _local1.treatments = this.initTreatments(event.info.data[ProtocolConstants.TREATMENTS]);
        }
        protected function initTreatments(_arg1:Array):Array{
            var _local3:TreatmentVO;
            var _local4:Object;
            var _local2:Array = [];
            for each (_local4 in _arg1) {
                _local3 = new TreatmentVO(_local4);
                _local2.push(_local3);
            };
            return (_local2);
        }

    }
}//package net.wooga.pets.controllers 
